<%@page import="com.team.entity.Project"%>
<%@page import="com.team.entity.Idea"%>
<%@ page import="com.team.entity.User" %>
 <%@ page import="com.team.util.Const" %>
 <%@ page import="com.team.entity.Document"%>
<%@ page import="com.team.util.DateCount" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>想法</title>
	<link rel="stylesheet" href="css/prettify.css" />
    <link rel="stylesheet" href="css/bootstrap.min.css" />
   
</head>
<body class="body">
<% 
	User user = (User)session.getAttribute(Const.SESSION_USER); 
	Project project =(Project)session.getAttribute(Const.SESSION_PROJ);
 %>
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a href="#" class="brand">凯盛项目管理系统</a>
				 <ul class="nav pull-right">
						<li><a class="nav pull-right" href="#">用户名： <%=user.getUsername() %></a></li>
				 </ul>
			</div>
		</div>
	</div>
  
	<div class="container">
		<div class="row">
					<div class="span3">
					<div class="well" style="padding: 8px 0;">
						<ul class="nav nav-list">
						  <li class="nav-header"><%=project.getProjName() %></li>
						  <li class="divider"></li>
						  <li ><a href="info.jspx?_m=select&projId=<%=project.getId() %>"><i class="icon-home"></i>最新动态</a></li>
						  <li><a href="addGoal.jspx?_m=select"><i class="icon-flag"></i>目标</a></li>
						  <li ><a href="docShare.jspx?_m=select&projId=<%=project.getId() %>"><i class="icon-folder-open"></i>资料库</a></li>
						  <li ><a href="newFolder.jspx?_m=select"><i class="icon-file"></i>文件共享</a></li>
						  <li><a href="newContact.jspx?_m=select&projId=<%=project.getId() %>"><i class="icon-user"></i>联系人</a></li>
						  <li class="active"><a href="newIdea.jspx?_m=select&id=<%=project.getId() %>"><i class="icon-white icon-fire"></i>想法</a></li>
						  <li><a href="findBug.jsp"><i class="icon-warning-sign"></i>Bug</a></li>
						  <li><a href="projReset.jsp"><i class="icon-cog"></i>项目设置</a></li>
						</ul>
					</div>
				</div>
			
			<div class="span9">
			<ul style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px" class="breadcrumb">
				<li class="active">
					<span>想法</span>
				</li>
				<li class="pull-right"><i class="icon-plus"></i><a class="link-black" href="newidea.jsp">发表想法</a></li>
			</ul>
			<div style="margin-bottom:20px;" class="wall">
			<%
				List<Idea> list  =(List<Idea>)session.getAttribute(Const.SESSION_IDEAList);
				Map<Idea,User> map = (Map<Idea,User>)session.getAttribute(Const.SESSION_MAPIDEA);
				if(list == null || map == null){
			 %>
			 	 <div style="color:red;">还没任何想法</div>
			 
			 <%}else{ 
			 	for(Idea idea:list){
			 	
			 %>
				<blockquote>
					<%=idea.getId() %>
				  <h4><a href="newIdea.jspx?_m=find&ideaId=<%=idea.getId() %>"><%=idea.getTitle()%></a></h4>
				  <p style="font-size:14px;line-height:1.5;"><%=idea.getContent() %></p>
				  <small><%=map.get(idea).getUserName() %>发布于  <%=DateCount.getDateCount(idea.getCreateTime()) %>前</small>
				  <a title="编辑" href="newIdea.jspx?_m=edit&id=<%=idea.getId() %>"><i class="icon-pencil"></i></a>
				  <a title="删除" href="javascript:;"><i class="icon-trash"></i></a>
				</blockquote>
				<%}} %>
				
				
				<div class="pagination pull-right">
				  <ul>
					<li><a href="#">Prev</a></li>
					<li class="active">
					  <a href="#">1</a>
					</li>
					<li><a href="#">2</a></li>
					<li><a href="#">3</a></li>
					<li><a href="#">4</a></li>
					<li><a href="#">Next</a></li>
				  </ul>
				</div>
				
				<div class="clear"></div>
			</div>
		</div>
			
			
			
				
		
		</div>
	
		
		
	
	</div>
</body>
</html>